home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Updaters / WhiteCap 3.0.4 / WhiteCap Source.sit / WhiteCap Source / Common / io / Headers / CEgIOFile.h < prev    next >
Text File  |  1999-07-13  |  842b  |  42 lines

  1. #ifndef _CEGIOFILE_
  2. #define _CEGIOFILE_
  3.  
  4. #include "CEgOStream.h"
  5. #include "CEgIFile.h"
  6.  
  7. /* *** Class usage note ***
  8.     Whenever the client switches modes (ie. from writing to reading or vice versa), the client *must*
  9.     call either seek() or seekEnd() (so that internal output buffer is flushed)
  10. */
  11.  
  12. class CEgIOFile : public CEgOStream, public CEgIFile {
  13.  
  14.     private:
  15.         
  16.     protected:
  17.         
  18.         int                            mDoTrunc;
  19.         
  20.         enum {
  21.             cMaxOBufSize            = 70000
  22.         };
  23.         
  24.  
  25.     public:
  26.                                     CEgIOFile( int inDoTrunc = true );
  27.         virtual                     ~CEgIOFile();
  28.         
  29.         virtual void                open( const CEgFileSpec* inSpecPtr );    
  30.         virtual void                close();
  31.  
  32.         void                        flush();
  33.         
  34.         // Overrides from CEgErr
  35.         virtual void                seek( long inPos );
  36.         virtual long                size();
  37.         virtual void                PutBlock( const void* inSrce, long numBytes );
  38.  
  39.         static long                    sCreatorType;
  40. };
  41.  
  42. #endif